$('.carousel').carousel({
    interval: 2000
})
window.onscroll = function() {
    var mainNav = document.getElementById("mainNav");
    if (document.body.scrollTop > 50 || document.documentElement.scrollTop > 50) {
        mainNav.classList.add("navbar-scrolled");
    } else {
        mainNav.classList.remove("navbar-scrolled");
    }
};
var lastFooterImg = document.getElementById("lastFooterImg");
/*设置一个定时器,两秒后lastFooterImg的src路径为./images/v-logo-3.png,两秒后恢复为./images/v-logo-1.png,一直循环*/
setInterval(function(){
    if(lastFooterImg.src.indexOf("v-logo-3.png")!=-1){
        lastFooterImg.src = "./images/v-logo-1.png";
    }else{
        lastFooterImg.src = "./images/v-logo-3.png";
    }
},2000);

var loginBtn = document.getElementById("loginBtn");
    loginBtn.onclick = function(){
    window.alert("登录功能暂未开放");
}

